<?
if ($_POST[action] == "resume_doupdate")
{
	//print_r($_POST);
	$err = '';
	if ($_POST['re_jobsearchstatus'] == '0')
	{
		//$err .= "Job search status must select one from the list<br>";
	}
	if ($_POST['re_fname'] == '')
	{
		$err .= "First name is required<br>";
	}
	if ($_POST[re_lname] == '')
	{
		$err .= "Last Name is required<br>";
	}
	if ($_POST[re_email] == '')
	{
		$err .= "Email address is required<br>";
	}elseif(!ereg("^[a-zA-Z0-9][a-zA-Z0-9_\.]+[a-zA-Z0-9]@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $_POST[re_email])){
	      $err .= "Invalid Email address<br />";
	  
	}
	if ($_POST[re_address1] == '')
	{
		//$err .= "Street Address 1 is required<br>";
	}
	if ($_POST[re_locity] == '')
	{
		//$err .= "Location - City is required<br>";
	}
	if ($_POST[re_lostate] == '0')
	{
		//$err .= "State must select one from the list<br>";
	}
	if ($_POST[re_locountry] == '0')
	{
		//$err .= "Country must select one from the list<br>";
	}
	if ($_POST[re_phone1] == '')
	{
		//$err .= "Primary Phone is required<br>";
	}
	if ($_POST[re_nickname] == '')
	{
		//$err .= "Nick Name is required<br>";
	}
	if ($_POST[re_jobtype] == '0')
	{
		//$err .= "Desired job type must select one from the list<br>";
	}
	if ($_POST[re_jobindustry] == '0')
	{
		//$err .= "Desired job category/industry must select one from the list<br>";
	}
	if ($_POST[re_jobtitle] == '')
	{
		//$err .= "Desired job title is required<br>";
	}
	if ($_POST[re_yearexp] == '0')
	{
		//$err .= "Years of work experience must select one from the list<br>";
	}
	if ($_POST[re_edulevel] == '0')
	{
		//$err .= "Highest education level must select one from the list<br>";
	}
	if ($_POST[re_mgmt] == '0')
	{
		//$err .= "Years of people mgmt experience must select one from the list<br>";
	}
	if ($_POST[re_profit] == '0')
	{
		//$err .= "Years of profit & loss responsibility must select one from the list<br>";
	}
	if ($_POST[re_spoken] == '')
	{
		//$err .= "Spoken language(s) is required<br>";
	}
	if ($_POST[re_detail] == '')
	{
		//$err .= "Resume detail is required<br>";
	}
	if ($_POST[re_prvemployer]==''&&$_SESSION[usertype]=='recruiter'){
		//$err .= "Three Previous Employers is required.<br>";
	}
	if(!PhpCaptcha::Validate($_POST['imagecode'])){
		//$err .= "Invalid Safe Code.  Please try again.<br>";
	}
	if($_FILES[uploadfile][name] != ''&&$_FILES[uploadfile][size]>5000000){
		$err .= "Resume File(Only acccept doc/docx/txt/pdf) files size less than 5MB.)";
	}
	if($_FILES[uploadresume][name] != ''&&$_FILES[uploadresume][size]>5000000){
		$err .= "Resume File(Only acccept doc/docx/txt/pdf) files size less than 5MB.)";
	}
	if ($err == '')
	{
		include ("./insert_do/resume_upd.php");
	}
	else
	{
		$re_usertype = mysql_escape_string(trim($_POST[re_usertype]));
		$re_fname = mysql_escape_string(trim($_POST[re_fname]));
		$re_lname = mysql_escape_string(trim($_POST[re_lname]));
		$re_email = mysql_escape_string(trim($_POST[re_email]));
		$re_address1 = mysql_escape_string(trim($_POST[re_address1]));
		$re_address2 = mysql_escape_string(trim($_POST[re_address2]));
		$re_lostate = mysql_escape_string(trim($_POST[re_lostate]));
		$re_locountry = mysql_escape_string(trim($_POST[re_locountry]));
		$re_locity = mysql_escape_string(trim($_POST[re_locity]));
		$re_phone1 = mysql_escape_string(trim($_POST[re_phone1]));
		$re_phone2 = mysql_escape_string(trim($_POST[re_phone2]));
		$re_rccomment = trim($_POST[re_rccomment]);
		$re_nickname = mysql_escape_string(trim($_POST[re_nickname]));
		$re_jobtype = mysql_escape_string(trim($_POST[re_jobtype]));
		$re_jobindustry = mysql_escape_string(trim($_POST[re_jobindustry]));
		$re_jobtitle = mysql_escape_string(trim($_POST[re_jobtitle]));
		$re_yearexp = mysql_escape_string(trim($_POST[re_yearexp]));
		$re_edulevel = mysql_escape_string(trim($_POST[re_edulevel]));
		$re_proflicense = mysql_escape_string(trim($_POST[re_proflicense]));
		$re_mgmt = mysql_escape_string(trim($_POST[re_mgmt]));
		$re_profit = mysql_escape_string(trim($_POST[re_profit]));
		$re_spoken = mysql_escape_string(trim($_POST[re_spoken]));
		$re_prolang = mysql_escape_string(trim($_POST[re_prolang]));
		$re_ip = mysql_escape_string(trim($_POST[re_ip]));
		$re_ussecurity = mysql_escape_string(trim($_POST[re_ussecurity]));
		$re_authorize = mysql_escape_string(trim($_POST[re_authorize]));
		$re_detail = trim($_POST[re_detail]);
		$re_comments = mysql_escape_string(trim($_POST[re_comments]));
		$re_currentpay = mysql_escape_string(trim($_POST[re_currentpay]));
		$re_desiredpay = mysql_escape_string(trim($_POST[re_desiredpay]));
		$re_jobsearchstatus = mysql_escape_string(trim($_POST[re_jobsearchstatus]));
		$re_benefits = mysql_escape_string(trim($_POST[re_benefits]));
		$re_schoolattend = mysql_escape_string(trim($_POST[re_schoolattend]));
		$re_describeme = mysql_escape_string(trim($_POST[re_describeme]));
		$re_favoriatebook = mysql_escape_string(trim($_POST[re_favoriatebook]));
		$re_highachieve = mysql_escape_string(trim($_POST[re_highachieve]));
		$re_iplan = mysql_escape_string(trim($_POST[re_iplan]));
		$re_iliketo = mysql_escape_string(trim($_POST[re_iliketo]));
		$re_personalweb= mysql_escape_string(trim($_POST[re_personalweb]));
		$re_prvemployer= mysql_escape_string(trim($_POST[re_prvemployer]));
		$re_prvempstatus= mysql_escape_string(trim($_POST[re_prvempstatus]));
		$re_professavilable= mysql_escape_string(trim($_POST[re_professavilable]));
		$re_private= mysql_escape_string(trim($_POST[re_private]));
		$re_id = mysql_escape_string(trim($_POST[editid]));
        $_showDbData = 0;
	}

}
?>